home *** CD-ROM | disk | FTP | other *** search
- /*
- File: PrmRslvr.h
-
- Contains: PromiseResolver header
-
- Written by: Vincent Lo
-
- Copyright: © 1994 - 1995 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <3> 4/10/95 VL 1236490: Made GetPromiseValue work during
- FulfillPromise.
- <2> 3/14/95 VL 1225208,1225201: Added IsSettingPromise to
- ensure that we don't call ResolvePromise
- while setting a promise.
- <1> 7/26/94 VL first checked in
- To Do:
- */
-
- #ifndef _PRMRSLVR_
- #define _PRMRSLVR_
-
- #ifndef _ODTYPES_
- #include <ODTypes.h>
- #endif
-
- #ifndef __CM_API__
- #include <CMAPI.h>
- #endif
-
- typedef struct {
- ODPart* sourcePart;
- ProcessSerialNumber sourcePSN;
- } ODValueRefCon;
-
- class CMStorageUnit;
- class ODPart;
-
- class PromiseResolver
- {
- public:
-
- PromiseResolver();
-
- ~PromiseResolver();
-
- void InitPromiseResolver(CMStorageUnit* su);
-
- ODBoolean IsPromiseValue(Environment* ev);
-
- void SetSourcePart(Environment* ev,
- ODPart *sourcePart);
-
- ODPart* GetSourcePart(Environment* ev);
-
- void ClearPromise(Environment* ev);
-
- void ResolvePromise(Environment* ev);
-
- ODULong GetPromiseCount();
-
- void SettingPromise();
-
- void DoneSettingPromise();
-
- ODBoolean IsSettingPromise();
-
- protected:
-
- ODPtr GetPromiseInfo(CMValue curValue);
-
- void SetPromiseInfo(CMValue curValue, ODPtr theInfo);
-
- void IncrementPromiseCount();
-
- void DecrementPromiseCount();
-
- ODULong fPromiseCount;
- CMStorageUnit* fSU;
- ODBoolean fSettingPromise;
- ODValueRefCon* fResolvingPromiseInfo;
- };
-
-
- #endif // _PRMRSLVR_
-